{{ $className        := .class        | default "" }}
{{ $idAttr           := .id           | default "" }}
{{ $typeAttr         := .type         | default "text" }}
{{ $nameAttr         := .name         | default "" }}
{{ $valueAttr        := .value        | default "" }}
{{ $autocompleteAttr := .autocomplete | default "off" }}


{{ $class        := printf " class=%q"        $className        | safeHTMLAttr }}
{{ $id           := printf " id=%q"           $idAttr           | safeHTMLAttr }}
{{ $type         := printf " type=%q"         $typeAttr         | safeHTMLAttr }}
{{ $name         := printf " name=%q"         $nameAttr         | safeHTMLAttr }}
{{ $value        := printf " value=%q"        $valueAttr        | safeHTMLAttr }}
{{ $autocomplete := printf " autocomplete=%q" $autocompleteAttr | safeHTMLAttr }}


{{ $input := printf "<input%s%s%s%s%s%s>" $class $type $name $value $id $autocomplete | safeHTML }}
{{ return $input }}